package com.vogue.supplymall.payment.dto;

import java.io.Serializable;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * 单笔支付调用接口封装参数DTO
 * @author cy
 */
@SuppressWarnings("serial")
public class SinglePayInputParameter extends ValidationDTO implements Serializable {

    /**
     * 验证有效值的字段集合
     */
    public static final Map<String, List<Object>> valueValidityMap = new HashMap<String, List<Object>>() {{
         put("paytypeid", Arrays.asList((new Integer[]{5, 6, 7, 8, 20})));
         put("cardflag", Arrays.asList((new Integer[]{0, 1})));
         put("product", Arrays.asList((new String[]{"600000","700000"})));
         put("isdis", Arrays.asList((new Integer[]{0, 1})));
    }};
    
    /**
     * 验证必填字段的集合
     */
    public static final List<String> requiredList = Arrays.asList((new String[]{
        "paytypeid", "data", "orderid", "storeid", "money", "dismoney", 
        "items","itemid", "itemname", "itemcount", "price"
    }));
    
    /**
     * 支付方式（5：闪惠 6：微信 7：百度钱包 8：支付宝）(必填)
     */
    private Integer paytypeid;
    
    /**
     * 订单id
     */
    private String orderid;
    
    /**
     *  门店id
     */
    private String storeid;
    
    /**
     * 价格
     */
    private Double money;
    
    /**
     * 风行云供应链:600000,食尚购:700000
     */
    private String product = "700000";
    
    /**
     * 支付成功页面重定向地址
     */
    private String redirectUrl = "http://192.168.7.70:8088/x5/UI2/v_/supplyShop/container.w";
    
    /**
     * 支付方门店mcid
     */
    private String paystoreid;
    
    /**
     * 客户端IP地址
     */
    private String clientIp;  
    
    /**
     * 支付总体内容 填充内部类Order对象即可(必填)
     */
    private InputParameterOrder data;
    
    /**
     * 支付方式（5：闪惠 6：微信 7：百度钱包 8：支付宝）(必填)
     */
    public Integer getPaytypeid() {
        return paytypeid;
    }

    /**
     * 支付方式（5：闪惠 6：微信 7：百度钱包 8：支付宝）(必填)
     */
    public void setPaytypeid(Integer paytypeid) {
        this.paytypeid = paytypeid;
    }

    /**
     * 支付总体内容 填充内部类Order对象即可(必填)
     */
    public InputParameterOrder getData() {
        return data;
    }

    /**
     * 支付总体内容 填充内部类Order对象即可(必填)
     */
    public void setData(InputParameterOrder data) {
        this.data = data;
    }

    public String getOrderid() {
        return orderid;
    }

    public void setOrderid(String orderid) {
        this.orderid = orderid;
    }

    public String getStoreid() {
        return storeid;
    }

    public void setStoreid(String storeid) {
        this.storeid = storeid;
    }

    public Double getMoney() {
        return money;
    }

    public void setMoney(Double money) {
        this.money = money;
    }

    public String getProduct() {
        return product;
    }

    public void setProduct(String product) {
        this.product = product;
    }

    public String getRedirectUrl() {
        return redirectUrl;
    }

    public void setRedirectUrl(String redirectUrl) {
        this.redirectUrl = redirectUrl;
    }

    /**
     * @return 支付方门店mcid
     */
    public String getPaystoreid() {
        return paystoreid;
    }

    /**
     * 设置  支付方门店mcid
     * @param paystoreid 支付方门店mcid
     */
    public void setPaystoreid(String paystoreid) {
        this.paystoreid = paystoreid;
    }

    /**
     * @return 客户端IP地址
     */
    public String getClientIp() {
        return clientIp;
    }

    /**
     * 设置 客户端IP地址
     * @param clientIp 客户端IP地址
     */
    public void setClientIp(String clientIp) {
        this.clientIp = clientIp;
    }
    
    List<String> requiredFieldList(){
        return requiredList;
    }

    @Override
    Map<String, List<Object>> valueValidityMap() {
        return valueValidityMap;
    }
}
